package com.sample.ab.domain.entity;

import java.util.List;

import javax.persistence.*;

import org.wisdom.data.jpa.entity.BaseEntity;

import lombok.*;
import lombok.extern.slf4j.Slf4j;

/**
 * @author 张智研
 * @date 2022/11/10 14:39
 **/
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Slf4j
public class BusHeader extends BaseEntity {
    private String bldat;
    private String budat;
    private String frbnr;
    private String sapCode;
    private String sapYear;
    private Integer isCow;

    @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)
    @JoinColumn(name = "headerCode")
    private List<BusLine> lineList;
}
